webpackJsonp([48],{

/***/ "+fx1":
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ "m/lA":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/regenerator/index.js
var regenerator = __webpack_require__("lC5x");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/core-js/promise.js
var promise = __webpack_require__("rVsN");
var promise_default = /*#__PURE__*/__webpack_require__.n(promise);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__("KH7x");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("J0Oq");
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);

// EXTERNAL MODULE: ./node_modules/_babel-runtime@6.26.0@babel-runtime/helpers/extends.js
var helpers_extends = __webpack_require__("4YfN");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);

// EXTERNAL MODULE: ./src/store/index.js
var store = __webpack_require__("IcnI");

// EXTERNAL MODULE: ./src/common/api/commonApi.js
var commonApi = __webpack_require__("+/+p");

// EXTERNAL MODULE: ./src/common/utils/index.js
var utils = __webpack_require__("dh3M");

// CONCATENATED MODULE: ./node_modules/_babel-loader@7.1.5@babel-loader/lib!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=script&index=0!./src/common/anjian/message/detail-meeting.vue





//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//





/* harmony default export */ var detail_meeting = ({
  data: function data() {
    return {
      currentData: {},
      form: {},
      rules: {
        peopleList: {
          type: 'array',
          required: true,
          message: '请添加参会人员!'
        }
      }
    };
  },
  created: function created() {
    var _this = this;

    store["a" /* BUS */].$on(store["b" /* EVENTS */].messageMettingPersonList, function (list) {
      _this.form = extends_default()({}, _this.form, { peopleList: list });
    });
  },
  activated: function activated() {
    var _this2 = this;

    return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
      var p, _ref, _ref2, department, data, record;

      return regenerator_default.a.wrap(function _callee$(_context) {
        while (1) {
          switch (_context.prev = _context.next) {
            case 0:
              if (!_this2.$router.$isBack) {
                _context.next = 2;
                break;
              }

              return _context.abrupt('return');

            case 2:
              p = [commonApi["a" /* commonApi */].dictionary('sending_department'), commonApi["a" /* commonApi */].searchById('WJ_conference_notice', _this2.$route.query.id), commonApi["a" /* commonApi */].searchById('WJ_conference_record', _this2.$route.query.recordId)];
              _context.next = 5;
              return promise_default.a.all(p);

            case 5:
              _ref = _context.sent;
              _ref2 = slicedToArray_default()(_ref, 3);
              department = _ref2[0];
              data = _ref2[1];
              record = _ref2[2];

              _this2.form = record;
              _this2.currentData = Object(utils["d" /* ReplaceDictionary */])(data, {
                sending_department: department
              });

            case 12:
            case 'end':
              return _context.stop();
          }
        }
      }, _callee, _this2);
    }))();
  },

  methods: {
    onSign: function onSign(loaded) {
      var _this3 = this;

      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee2() {
        return regenerator_default.a.wrap(function _callee2$(_context2) {
          while (1) {
            switch (_context2.prev = _context2.next) {
              case 0:
                _context2.prev = 0;
                _context2.next = 3;
                return commonApi["a" /* commonApi */].save('WJ_conference_record', {
                  id: _this3.form.id,
                  state: 1
                });

              case 3:
                _this3.form.state = 1;
                _this3.$Toast('签收成功!', 'success');
                _context2.next = 10;
                break;

              case 7:
                _context2.prev = 7;
                _context2.t0 = _context2['catch'](0);

                _this3.$Toast('签收失败!', 'error');

              case 10:
                loaded();

              case 11:
              case 'end':
                return _context2.stop();
            }
          }
        }, _callee2, _this3, [[0, 7]]);
      }))();
    },
    onReport: function onReport(loaded) {
      var _this4 = this;

      return asyncToGenerator_default()( /*#__PURE__*/regenerator_default.a.mark(function _callee3() {
        return regenerator_default.a.wrap(function _callee3$(_context3) {
          while (1) {
            switch (_context3.prev = _context3.next) {
              case 0:
                _context3.prev = 0;
                _context3.next = 3;
                return commonApi["a" /* commonApi */].save('WJ_conference_record', {
                  id: _this4.form.id,
                  state: 2,
                  peopleList: _this4.form.peopleList
                });

              case 3:
                _this4.form.state = 2;
                _this4.$Toast('上报成功!', 'success');
                _context3.next = 10;
                break;

              case 7:
                _context3.prev = 7;
                _context3.t0 = _context3['catch'](0);

                _this4.$Toast('上报失败!', 'error');

              case 10:
                loaded();

              case 11:
              case 'end':
                return _context3.stop();
            }
          }
        }, _callee3, _this4, [[0, 7]]);
      }))();
    },
    goAddPerson: function goAddPerson() {
      this.$router.$push({
        path: '/message/add-meeting-person',
        query: { data: this.form.peopleList }
      });
    }
  }
});
// CONCATENATED MODULE: ./node_modules/_vue-loader@13.7.3@vue-loader/lib/template-compiler?{"id":"data-v-459e5c51","hasScoped":true,"transformToRequire":{"video":["src","poster"],"source":"src","img":"src","image":"xlink:href"},"buble":{"transforms":{}}}!./node_modules/_vue-loader@13.7.3@vue-loader/lib/selector.js?type=template&index=0!./src/common/anjian/message/detail-meeting.vue
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('yt-page',{attrs:{"title":"会议详情","scroll":""}},[_c('yt-form',{attrs:{"model":_vm.form,"rules":_vm.rules}},[_c('yt-card',{attrs:{"title":"基本信息"}},[_c('yt-cell',{attrs:{"label":"组织单位"}},[_vm._v(_vm._s(_vm.currentData.sending_department))]),_vm._v(" "),_c('yt-cell',{attrs:{"label":"会议开始时间","labelWidth":"120px"}},[_vm._v(_vm._s(_vm.currentData.meeting_start_time))]),_vm._v(" "),_c('yt-textarea',{attrs:{"title":"会议主题","border":"none","type":"column","disabled":""},model:{value:(_vm.currentData.title),callback:function ($$v) {_vm.$set(_vm.currentData, "title", $$v)},expression:"currentData.title"}})],1),_vm._v(" "),_c('yt-card',{attrs:{"title":"附件"}},[_vm._l((_vm.currentData.file),function(file,index){return _c('yt-cell-open-file',{key:index,attrs:{"title":file.name,"url":file.url}},[_vm._v("\n        "+_vm._s(file.name)+"\n      ")])}),_vm._v(" "),(!_vm.currentData.file)?_c('p',{staticClass:"card-no-data"},[_vm._v("暂无附件")]):_vm._e()],2),_vm._v(" "),_c('yt-card',{attrs:{"title":"参会人员","btn":"添加参会人员"},on:{"btn-click":_vm.goAddPerson}},[_c('p',{staticClass:"card-cell c-gray"},[_c('span',[_vm._v("姓名")]),_vm._v(" "),_c('span',[_vm._v("职务")]),_vm._v(" "),_c('span',[_vm._v("联系电话")])]),_vm._v(" "),_vm._l((_vm.form.peopleList),function(person,index){return _c('p',{key:index,staticClass:"card-cell"},[_c('span',[_vm._v(_vm._s(person.name))]),_vm._v(" "),_c('span',[_vm._v(_vm._s(person.position))]),_vm._v(" "),_c('span',[_vm._v(_vm._s(person.telephone))])])})],2),_vm._v(" "),(_vm.form.state === 0)?_c('yt-btn',{attrs:{"slot":"btn","loading":_vm.onSign,"edge":""},slot:"btn"},[_vm._v("签收")]):_vm._e(),_vm._v(" "),(_vm.form.state === 1)?_c('yt-btn',{attrs:{"slot":"btn","loading":_vm.onReport,"edge":"","validator":""},slot:"btn"},[_vm._v("上报")]):_vm._e()],1)],1)}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ var message_detail_meeting = (esExports);
// CONCATENATED MODULE: ./src/common/anjian/message/detail-meeting.vue
function injectStyle (ssrContext) {
  __webpack_require__("+fx1")
}
var normalizeComponent = __webpack_require__("C7Lr")
/* script */


/* template */

/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-459e5c51"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  detail_meeting,
  message_detail_meeting,
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)

/* harmony default export */ var anjian_message_detail_meeting = __webpack_exports__["default"] = (Component.exports);


/***/ })

});